This function returned numbers for error codes. Change them to error
codes.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
if (!attributes)
/* bad parameter */
- return -1;
+ return -EINVAL;
if (!attr_list)
/* list not found */
- return 1;
+ return -EINVAL;
entry = reverse_strstr(attr_list, name, NULL);
while (entry != NULL) {
}
/* not found in list */
- return 2;
+ return -ENOENT;
}